package chapter04.Example21;
class Outer {
    int m = 0;
    void test1(){
        System.out.println("外部成员方法");
    }
    void test2(){
        class Inner{
            int n =1;
            void show(){
                System.out.println("外部成员变量m = "+ m);
                test1();
            }
        }
        Inner inner = new Inner();
        System.out.println("局部内部变量n ="+ inner.n);
        inner.show();
    }
}
public class Example21 {
    public static void main(String[] args) {
        Outer outer = new Outer();
        outer.test2();
    }
}
